package com.yanqu.road.entity.season;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;

@FieldTypeAnnotation(tableName = "t_u_season_reward")
public class SeasonRewardData extends DataObject {

    @FieldTypeAnnotation(desc = "玩家ID", select = true, update = true)
    private long userId;
    @FieldTypeAnnotation(desc = "系统ID", select = true, update = true)
    private int systemId;
    @FieldTypeAnnotation(desc = "赛季", select = true, update = true)
    private int seasonId;
    @FieldTypeAnnotation(desc = "类型", update = true)
    private int type;
    @FieldTypeAnnotation(desc = "奖励ID", update = true)
    private int rewardId;

    @FieldTypeAnnotation(desc = "进度值")
    private long value;
    @FieldTypeAnnotation(desc = "是否领奖")
    private boolean getReward;
    @FieldTypeAnnotation(desc = "修改时间")
    private long time;

    @FieldTypeAnnotation(desc = "额外参数")
    private String param = "";

    public SeasonRewardData() {
    }

    public SeasonRewardData(long userId, int systemId, int seasonId, int type, int rewardId) {
        this.userId = userId;
        this.systemId = systemId;
        this.seasonId = seasonId;
        this.type = type;
        this.rewardId = rewardId;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public int getSystemId() {
        return systemId;
    }

    public void setSystemId(int systemId) {
        if (this.systemId != systemId) {
            this.systemId = systemId;
            setOp(DataStatus.Update);
        }
    }

    public int getSeasonId() {
        return seasonId;
    }

    public void setSeasonId(int seasonId) {
        if (this.seasonId != seasonId) {
            this.seasonId = seasonId;
            setOp(DataStatus.Update);
        }
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        if (this.type != type) {
            this.type = type;
            setOp(DataStatus.Update);
        }
    }

    public int getRewardId() {
        return rewardId;
    }

    public void setRewardId(int rewardId) {
        if (this.rewardId != rewardId) {
            this.rewardId = rewardId;
            setOp(DataStatus.Update);
        }
    }

    public long getValue() {
        return value;
    }

    public void setValue(long value) {
        if (this.value != value) {
            this.value = value;
            setOp(DataStatus.Update);
        }
    }

    public boolean isGetReward() {
        return getReward;
    }

    public void setGetReward(boolean getReward) {
        if (this.getReward != getReward) {
            this.getReward = getReward;
            setOp(DataStatus.Update);
        }
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        if (this.time != time) {
            this.time = time;
            setOp(DataStatus.Update);
        }
    }

    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        if(null == param){
            return;
        }
        if(!this.param.equals(param)) {
            this.param = param;
            setOp(DataStatus.Update);
        }
    }
}
